//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopOrder, MinishopOrderResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopOrderList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopOrderResponse>(`/uctoo/minishop_order/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopOrder = async (id: string) => {
  return requestClient.get<MinishopOrder>(`/uctoo/minishop_order/${id}`);
};

export const adductooMinishopOrder = async (data: Partial<MinishopOrder>) => {
  return requestClient.post<MinishopOrder>('/uctoo/minishop_order/add', data);
};

export const edituctooMinishopOrder = async (data: Partial<MinishopOrder>) => {
  return requestClient.post<MinishopOrder>('/uctoo/minishop_order/edit', data);
};

export const deleteuctooMinishopOrder = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_order/del', { id });
};
